package com.fuershiye.woman.monitor.beans;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

public class QueryForm {
    private String factName;
    private Integer page;
    private Integer rows;
    private Integer area;
    private Integer city;
    private String contactId;

    private Integer idate;
    private Integer isOnline;
    private String name;
    private Integer factoryId;
    private Integer  promotionFlag;
    private Integer status;
    private Integer onOffLine;
    private Double activeFactor;
    private String createTimeString;
    private Integer channeltypeid;
    private String catecode;
	private String dimensionality;
    private String groupField="idate";
    private Integer all;
    private String export;
    private int matchMode;

    private int wtype;
    
    private Integer bdate;
    private Integer edate;
    private Integer poid=1;
	private Integer platform;
    private Integer os;
    private Integer isonline;
    private int costType;
    private int evaluationType;
    private Integer channelType;
    private Integer channelId;
    
    private Integer[] catearea;
    private Integer[] provinces ;
    private Integer[] citys;
	private String[] version;
	private String[] versions;
	private String[] catecodes;
    private Integer[] platforms;
    private Integer[] isonlines;
    private String[] channelIds;
    private String[] orders;
    private Integer[] channelTypes;
    private Integer[] costTypes;
    private Integer[] factoryIds;
    /*渠道联系人，复选*/
    private String[] contactIds;
    
    @DateTimeFormat(pattern="yyyy-MM-dd")  
    private Date dataOpenTime;

    
    public QueryForm(){
    	
        DateFormat df = new SimpleDateFormat("yyyyMMdd");
        
        Calendar c = Calendar.getInstance();
        c.add(Calendar.DAY_OF_YEAR, -1);
        this.edate = Integer.valueOf(df.format(c.getTime()));
        c.add(Calendar.DAY_OF_YEAR, -6);
        this.bdate = Integer.valueOf(df.format(c.getTime()));
        this.poid=1;
        this.platform = -1;
        this.isonline= -1;
        this.catecode = "-1";
        this.provinces = new Integer[]{-1};
        this.citys = new Integer[]{-1};
    }

    public int getWtype() {
        return wtype;
    }

    public void setWtype(int wtype) {
        this.wtype = wtype;
    }

    public Integer getCity() {
        return city;
    }

    public void setCity(Integer city) {
        this.city = city;
    }

    public Integer getProvince() {
        return province;
    }

    public void setProvince(Integer province) {
        this.province = province;
    }

    private Integer province;
    public Integer getArea() {
        return area;
    }

    public void setArea(Integer area) {
        this.area = area;
    }

    public Integer getOnline() {
        return isOnline;
    }

    public void setOnline(Integer online) {
        isOnline = online;
    }

    public Integer[] getCateareas() {
        return catearea;
    }

    public void setCateareas(Integer[] catearea) {
        this.catearea = catearea;
    }

    public Integer getIdate() {
		return idate;
	}
	public void setIdate(Integer idate) {
		this.idate = idate;
	}
	private Integer channelTypeId;
	public Integer getChannelTypeId() {
		return channelTypeId;
	}
	public void setChannelTypeId(Integer channelTypeId) {
		this.channelTypeId = channelTypeId;
	}
    public String getContactId() {
        return contactId;
    }
    public void setContactId(String contactId) {
        this.contactId = contactId;
    }
   
    public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getFactoryId() {
		return factoryId;
	}
	public void setFactoryId(Integer factoryId) {
		this.factoryId = factoryId;
	}
	public Integer getPromotionFlag() {
		return promotionFlag;
	}
	public void setPromotionFlag(Integer promotionFlag) {
		this.promotionFlag = promotionFlag;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Integer getOnOffLine() {
		return onOffLine;
	}
	public void setOnOffLine(Integer onOffLine) {
		this.onOffLine = onOffLine;
	}
	public Double getActiveFactor() {
		return activeFactor;
	}
	public void setActiveFactor(Double activeFactor) {
		this.activeFactor = activeFactor;
	}
	public String getCreateTimeString() {
		return createTimeString;
	}
	public void setCreateTimeString(String createTime) {
		this.createTimeString = createTime;
	}
	public Integer getChanneltypeid() {
		return channeltypeid;
	}
	public void setChanneltypeid(Integer channeltypeid) {
		this.channeltypeid = channeltypeid;
	}
	public Integer getIsOnline() {
		return isOnline;
	}
	public void setIsOnline(Integer isOnline) {
		this.isOnline = isOnline;
	}
	public Integer getPage() {
		return page;
	}
	public void setPage(Integer page) {
		this.page = page;
	}
	public Integer getRows() {
		return rows;
	}
	public void setRows(Integer rows) {
		this.rows = rows;
	}
	private Integer id;
    public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
    
    public String getFactName() {
		return factName;
	}
	public void setFactName(String factName) {
		this.factName = factName;
	}
    
    public String[] getVersions() {
        return versions;
    }
    public void setVersions(String[] versions) {
        this.versions = versions;
    }
    /**
     * @return the bdate
     */
    public Integer getBdate() {
        return bdate;
    }
    /**
     * @param bdate the bdate to set
     */
    public void setBdate(Integer bdate) {
        if(bdate==null){
            return;
        }
        this.bdate = bdate;
    }
    /**
     * @return the edate
     */
    public Integer getEdate() {
        return edate;
    }
    /**
     * @param edate the edate to set
     */
    public void setEdate(Integer edate) {
        if(edate==null){
            return;
        }
        this.edate = edate;
    }
    /**
     * @return the poid
     */
    public Integer getPoid() {
        return poid;
    }
    /**
     * @param poid the poid to set
     */
    public void setPoid(Integer poid) {
        this.poid = poid;
    }
    /**
     * @return the platform
     */
    public Integer getPlatform() {
        return platform;
    }
    /**
     * @param platform the platform to set
     */
    public void setPlatform(Integer platform) {
        this.platform = platform;
    }
    /**
     * @return the os
     */
    public Integer getOs() {
        return os;
    }
    /**
     * @param os the os to set
     */
    public void setOs(Integer os) {
        this.os = os;
    }
    /**
     * @return the isonline
     */
    public Integer getIsonline() {
        return isonline;
    }
    /**
     * @param isonline the isonline to set
     */
    public void setIsonline(Integer isonline) {
        this.isonline = isonline;
    }

    public Integer[] getProvinces() {
		return provinces;
	}
	public void setProvinces(Integer[] provinces) {
		this.provinces = provinces;
	}
	public Integer[] getCitys() {
		return citys;
	}
	public void setCitys(Integer[] citys) {
		this.citys = citys;
	}
	/**
     * @return the version
     */
    public String[] getVersion() {
        return version;
    }
    /**
     * @param version the version to set
     */
    public void setVersion(String[] version) {
        this.version = version;
    }
    /**
     * @return the dimensionality
     */
    public String getDimensionality() {
        return dimensionality;
    }
    /**
     * @param dimensionality the dimensionality to set
     */
    public void setDimensionality(String dimensionality) {
        this.dimensionality = dimensionality;
    }
    /**
     * @return the groupField
     */
    public String getGroupField() {
        return groupField;
    }
    /**
     * @param groupField the groupField to set
     */
    public void setGroupField(String groupField) {
        this.groupField = groupField;
    }
    public Integer getAll() {
        return all;
    }
    public void setAll(Integer all) {
        this.all = all;
    }
    /**
     * @return the platforms
     */
    public Integer[] getPlatforms() {
        return platforms;
    }
    /**
     * @param platforms the platforms to set
     */
    public void setPlatforms(Integer[] platforms) {
        this.platforms = platforms;
    }
    /**
     * @return the isonlines
     */
    public Integer[] getIsonlines() {
        return isonlines;
    }
    /**
     * @param isonlines the isonlines to set
     */
    public void setIsonlines(Integer[] isonlines) {
        this.isonlines = isonlines;
    }
    /**
     * @return the catecodes
     */
    public String[] getCatecodes() {
        return catecodes;
    }
    /**
     * @param catecodes the catecodes to set
     */
    public void setCatecodes(String[] catecodes) {
        this.catecodes = catecodes;
    }
    /**
     * @return the catecode
     */
    public String getCatecode() {
        return catecode;
    }
    /**
     * @param catecode the catecode to set
     */
    public void setCatecode(String catecode) {
        this.catecode = catecode;
    }
    /**
     * @return the channelType
     */
    public Integer getChannelType() {
        return channelType;
    }
    /**
     * @param channelType the channelType to set
     */
    public void setChannelType(Integer channelType) {
        this.channelType = channelType;
    }

    public Integer getChannelId() {
        return channelId;
    }
    /**
     * @param channelId the channelId to set
     */
    public void setChannelId(Integer channelId) {
        this.channelId = channelId;
    }

	public String[] getChannelIds() {
		return channelIds;
	}

	public void setChannelIds(String[] channelIds) {
		this.channelIds = channelIds;
	}

	public int getCostType() {
		return costType;
	}

	public void setCostType(int costType) {
		this.costType = costType;
	}

	public String[] getOrders() {
		return orders;
	}

	public void setOrders(String[] orders) {
		this.orders = orders;
	}

	public int getEvaluationType() {
		return evaluationType;
	}

	public void setEvaluationType(int evaluationType) {
		this.evaluationType = evaluationType;
	}

	public Integer[] getChannelTypes() {
		return channelTypes;
	}

	public void setChannelTypes(Integer[] channelTypes) {
		this.channelTypes = channelTypes;
	}

	public Integer[] getCostTypes() {
		return costTypes;
	}

	public void setCostTypes(Integer[] costTypes) {
		this.costTypes = costTypes;
	}

	public Date getDataOpenTime() {
		return dataOpenTime;
	}

	public void setDataOpenTime(Date dataOpenTime) {
		this.dataOpenTime = dataOpenTime;
	}

	public Integer[] getFactoryIds() {
		return factoryIds;
	}

	public void setFactoryIds(Integer[] factoryIds) {
		this.factoryIds = factoryIds;
	}

    public String[] getContactIds() {
        return contactIds;
    }

    public void setContactIds(String[] contactIds) {
        this.contactIds = contactIds;
    }

    public String getExport() {
		return export;
	}

	public void setExport(String export) {
		this.export = export;
	}

	public int getMatchMode() {
		return matchMode;
	}

	public void setMatchMode(int matchMode) {
		this.matchMode = matchMode;
	}
	
}
